<script lang="ts">
import { defineComponent } from "vue";

export default defineComponent({
  props: {
    title: String,
    required: Boolean,
    desc: String,
  },
});
</script>

<template>
  <view class="menu-title">
    {{ title }}<text class="menu-title-star" v-if="required">*</text
    ><text class="menu-title-desc" v-if="desc">{{ desc }}</text>
  </view>
</template>

<style lang="scss">
.menu-title {
  font-size: 30rpx;
  color: #333333;
  line-height: 42rpx;
  font-weight: bold;

  .menu-title-star {
    color: #e55d5d;
  }

  .menu-title-desc {
    margin-left: 10rpx;
    font-size: 24rpx;
    color: #999999;
    line-height: 30rpx;
    font-weight: 400;
  }
}
</style>